// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj
// jsdoc语法提示教程：https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129

module.exports = {

	updateViews(id) {
		const db = uniCloud.database();
		const dbCmd = db.command;
		db.collection('positions')
			.doc(id)
			.update({
				view: dbCmd.inc(1)
			});
	}

}